package com.bluesea.report.service.customer.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.bluesea.report.dao.CustomerDetailDao;
import com.bluesea.report.entity.CustomerDetail;
import com.bluesea.report.service.customer.CustomerDetailService;



/**
 * CustomerService服务层实现类
* @ClassName: CustomerServiceImpl
* @Description: 增删改查
* @author 李爽
* @date 2017年8月15日 下午4:38:31
* @version V1.0
 */
@Service("customerDetailService")
public class CustomerDetailServiceImpl implements CustomerDetailService{

	@Resource  //注入dao
	private CustomerDetailDao dao;
     /**
      * 增加
      */
	public Integer createCustomerDetail(CustomerDetail custDetail) {
		Integer createDetail = dao.createAndGetId(custDetail);
		return createDetail;
	}
	
	/**
	 * 删除
	 */
	public Integer removeCustomerDetail(Integer id) {
		Integer removeDetail = dao.removeCustomerDetail(id);
		return removeDetail;
	}
	
	/**
	 * 批量删除
	 */
	public int deleteBatchCustomerDetail(Integer[] ids) {
		Integer deleteDetail = dao.deleteBatchCustomerDetail(ids);
		return deleteDetail;
	}
	
	/**
	 * 修改
	 */
	public void modifyCustomerDetail(CustomerDetail custDetail) {
		dao.modifyCustomerDetail(custDetail);
	}
	
	/**
	 * 查全部
	 */
	public List<CustomerDetail> getAllCustomerDetail() {
		List<CustomerDetail> listDetail = dao.getAllCustomerDetail();
		return listDetail;
	}
	
	/**
	 * 条件查询
	 */
	public List<CustomerDetail> searchCustomerDetail(CustomerDetail custDetail) {
		List<CustomerDetail> searchDetail= dao.searchCustomerDetail(custDetail);
		return searchDetail;
	}
	
	/**
	 * 撤户
	 */
	public void invalidCustomerDetail(Integer[] id) {
		dao.invalidCustomerDetail(id);
	}

}
